Export Abstract to Plaintext File

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Export Abstract to Plaintext File

corpus_info
Hi,

I have a collection of 1,926 files most of them have abstracts from PubMed. I want to build corpus to analyze some biological research.

My goal is to have a plaintext file for each abstract. I do not need any other data from myfile.bib. The name of the plaintext file can be anything simple.

Can someone help me out by pointing me to where I can find a template, marco, or other mechanism to run this export.

Thanks!!!
Reply | Threaded
Open this post in threaded view
|

Re: Export Abstract to Plaintext File

Christiaan Hofman

On Jul 12, 2010, at 15:06, corpus_info wrote:

>
> Hi,
>
> I have a collection of 1,926 files most of them have abstracts from PubMed.
> I want to build corpus to analyze some biological research.
>
> My goal is to have a plaintext file for each abstract. I do not need any
> other data from myfile.bib. The name of the plaintext file can be anything
> simple.
>
> Can someone help me out by pointing me to where I can find a template,
> marco, or other mechanism to run this export.
>
> Thanks!!!

If you want to have separate files for each item I think the only way is to use AppleScript. You may combine that with templates, using the AppleScript "export" command.

Christiaan



------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Bibdesk-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bibdesk-users
Reply | Threaded
Open this post in threaded view
|

Re: Export Abstract to Plaintext File

Christiaan Hofman

On Jul 12, 2010, at 17:10, Christiaan Hofman wrote:


On Jul 12, 2010, at 15:06, corpus_info wrote:


Hi,

I have a collection of 1,926 files most of them have abstracts from PubMed.
I want to build corpus to analyze some biological research.

My goal is to have a plaintext file for each abstract. I do not need any
other data from myfile.bib. The name of the plaintext file can be anything
simple.

Can someone help me out by pointing me to where I can find a template,
marco, or other mechanism to run this export.

Thanks!!!

If you want to have separate files for each item I think the only way is to use AppleScript. You may combine that with templates, using the AppleScript "export" command.

Christiaan



Here's a simple AppleScript to achieve this.

property theTemplate : "<$publications><$abstract/></$publications>"
set theFolder to POSIX path of (choose folder)
tell front document of application "BibDesk"
repeat with thePub in (get selection)
set thePub to contents of thePub
set theFile to POSIX file (theFolder & (cite key of thePub) & ".txt")
export using text theTemplate for thePub to theFile
end repeat
end tell

Christiaan


------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Bibdesk-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bibdesk-users