Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add possibility to grab image descriptions from txt files #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add possibility to grab image descriptions from txt files #24

wants to merge 1 commit into from

Conversation

ponychicken
Copy link

Useful since it can be hard to edit the iptc quickly.

@adriencater
Copy link

This is great, I was looking for this just a few days ago. (ref. http://getsatisfaction.com/stacey/topics/images_captions-13vahh )

I'll give it a run in my test branch!

@adriencater
Copy link

Plugged this into my fork, and it works great. The only thing I changed was the variable name associated with this data:

$this->data['@sidecar'] = $descM;

I though "sidecar" was a good indicator of the provenance of the data, and wouldn't interfere with the data coming in from the IPTC.

$desc = fread($fh, filesize($description_path));
$desc = preg_replace('/(?<!\n)\n(?![\n\*\#\-])/', " \n", trim($desc));
$descM = Markdown($desc);
$this->data['@description'] = $descM;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used @sidecar here to avoid collision with the IPTC data

@o-l-e
Copy link

o-l-e commented Nov 28, 2011

Hi, i found another way to add descriptions to images here:
https://github.com/splendid/stacey/commit/4cc609dc755cc36eb78c71c8ceb6b0656d23b56a
I changed the suggested "captions.stacey" to "captions.txt" as it seems more logical.

But, a good solution would be to be able to add captions in the same document as the project.txt with the matching name of the image, or even other assets.

For example in a text you would have:

date: 2011

content:

Lorem Ipsum

image1.jpg:

Caption text

image2.png:

Some text

folder.zip:
Some text

etc.

I really wish i knew some php, but i do not know how to do this myself.
Anyway good luck with your site.

O

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants