Discussion:
[Skim-app-users] Covert many .skim files with skimnotes tool?
Misha Velthuis
2017-03-19 02:03:14 UTC
Permalink
Hi all,

Not sure if this is the right way to ask this, but I have a question about the skimnotes tool (http://sourceforge.net/p/skim-app/wiki/SkimNotes_Tool/).

I have a relatively large database of .skim notes that I would like to convert into .txt or .rtf documents (so that DocFetcher can find them).

Today I found out about the skimnotes tool and it works great, the only problem is that it only seems to work on single files.

When there is only one .pdf file in the active directory (Mac terminal), and I run the command: "./skimnotes get -format rtf example.pdf", or when I run "./skimnotes get -format rtf *.pdf" I get an .rtf file with the notes of that pdf in the same directory. This works perfectly fine.

But when I have two pdf's or more in that directory, and I run the command "./skimnotes get -format rtf *.pdf" or "./skimnotes get -format rtf $(find *.pdf)" I do not get any .rtf file, and instead, one of the pdf's is greatly reduced in size and has become un-openable.

Am I doing something wrong? Is this a bug in the tool?

Is there any easy way to convert a large number of .skim notes into .rtf or .txt files? Am I on the right track?

Thanks a lot in advance! And thanks for working on this great software!

Best,

Misha
Christiaan Hofman
2017-03-19 10:29:54 UTC
Permalink
Post by Misha Velthuis
Hi all,
Not sure if this is the right way to ask this, but I have a question about the skimnotes tool (http://sourceforge.net/p/skim-app/wiki/SkimNotes_Tool/ <http://sourceforge.net/p/skim-app/wiki/SkimNotes_Tool/>).
I have a relatively large database of .skim notes that I would like to convert into .txt or .rtf documents (so that DocFetcher <http://docfetcher.sourceforge.net/en/index.html> can find them).
Today I found out about the skimnotes tool and it works great, the only problem is that it only seems to work on single files.
When there is only one .pdf file in the active directory (Mac terminal), and I run the command: "./skimnotes get -format rtf example.pdf", or when I run "./skimnotes get -format rtf *.pdf" I get an .rtf file with the notes of that pdf in the same directory. This works perfectly fine.
But when I have two pdf's or more in that directory, and I run the command "./skimnotes get -format rtf *.pdf" or "./skimnotes get -format rtf $(find *.pdf)" I do not get any .rtf file, and instead, one of the pdf's is greatly reduced in size and has become un-openable.
Am I doing something wrong? Is this a bug in the tool?
Is there any easy way to convert a large number of .skim notes into .rtf or .txt files? Am I on the right track?
Thanks a lot in advance! And thanks for working on this great software!
Best,
Misha
The skimnotes tool works on single files only. A second file is interpreted as the output file (run skimnotes help), so it won’t be a PDF file (even if you give it a PDF extension).

So you should run the skimnotes tool in a loop instead, for instance by using it in the command passed in a find command. There are two scripts running skimnotes on a list of files on the Wiki. Though they run slightly different commands from what you want, you could easily adapt them. The skimbulk script should come closest to what you want (it gets notes in .skim format rather than .txt or .rtf).

Christiaan
Christiaan Hofman
2017-03-19 10:55:20 UTC
Permalink
Post by Christiaan Hofman
Post by Misha Velthuis
Hi all,
Not sure if this is the right way to ask this, but I have a question about the skimnotes tool (http://sourceforge.net/p/skim-app/wiki/SkimNotes_Tool/ <http://sourceforge.net/p/skim-app/wiki/SkimNotes_Tool/>).
I have a relatively large database of .skim notes that I would like to convert into .txt or .rtf documents (so that DocFetcher <http://docfetcher.sourceforge.net/en/index.html> can find them).
Today I found out about the skimnotes tool and it works great, the only problem is that it only seems to work on single files.
When there is only one .pdf file in the active directory (Mac terminal), and I run the command: "./skimnotes get -format rtf example.pdf", or when I run "./skimnotes get -format rtf *.pdf" I get an .rtf file with the notes of that pdf in the same directory. This works perfectly fine.
But when I have two pdf's or more in that directory, and I run the command "./skimnotes get -format rtf *.pdf" or "./skimnotes get -format rtf $(find *.pdf)" I do not get any .rtf file, and instead, one of the pdf's is greatly reduced in size and has become un-openable.
Am I doing something wrong? Is this a bug in the tool?
Is there any easy way to convert a large number of .skim notes into .rtf or .txt files? Am I on the right track?
Thanks a lot in advance! And thanks for working on this great software!
Best,
Misha
The skimnotes tool works on single files only. A second file is interpreted as the output file (run skimnotes help), so it won’t be a PDF file (even if you give it a PDF extension).
So you should run the skimnotes tool in a loop instead, for instance by using it in the command passed in a find command. There are two scripts running skimnotes on a list of files on the Wiki. Though they run slightly different commands from what you want, you could easily adapt them. The skimbulk script should come closest to what you want (it gets notes in .skim format rather than .txt or .rtf).
Christiaan
BTW, here is a quick and dirty way to do it (skimbulk essentially does something like this, but neater and safer)

find DIR -type f -name "*.pdf" -exec /Applications/Skim.app/Contents/SharedSupport/skimnotes get -format rtf "{}" ";"

Christiaan
Misha Velthuis
2017-03-19 17:31:42 UTC
Permalink
Thanks a lot for the quick response! Both solutions work great.

Why are you saying that your script is safer? Is it because if provides more output, and thus more info when something goes wrong?

Thanks again for sharing all of this. It's making my day!

Misha
Post by Christiaan Hofman
Post by Misha Velthuis
Hi all,
Not sure if this is the right way to ask this, but I have a question about the skimnotes tool (http://sourceforge.net/p/skim-app/wiki/SkimNotes_Tool/).
I have a relatively large database of .skim notes that I would like to convert into .txt or .rtf documents (so that DocFetcher can find them).
Today I found out about the skimnotes tool and it works great, the only problem is that it only seems to work on single files.
When there is only one .pdf file in the active directory (Mac terminal), and I run the command: "./skimnotes get -format rtf example.pdf", or when I run "./skimnotes get -format rtf *.pdf" I get an .rtf file with the notes of that pdf in the same directory. This works perfectly fine.
But when I have two pdf's or more in that directory, and I run the command "./skimnotes get -format rtf *.pdf" or "./skimnotes get -format rtf $(find *.pdf)" I do not get any .rtf file, and instead, one of the pdf's is greatly reduced in size and has become un-openable.
Am I doing something wrong? Is this a bug in the tool?
Is there any easy way to convert a large number of .skim notes into .rtf or .txt files? Am I on the right track?
Thanks a lot in advance! And thanks for working on this great software!
Best,
Misha
The skimnotes tool works on single files only. A second file is interpreted as the output file (run skimnotes help), so it won’t be a PDF file (even if you give it a PDF extension).
So you should run the skimnotes tool in a loop instead, for instance by using it in the command passed in a find command. There are two scripts running skimnotes on a list of files on the Wiki. Though they run slightly different commands from what you want, you could easily adapt them. The skimbulk script should come closest to what you want (it gets notes in .skim format rather than .txt or .rtf).
Christiaan
BTW, here is a quick and dirty way to do it (skimbulk essentially does something like this, but neater and safer)
find DIR -type f -name "*.pdf" -exec /Applications/Skim.app/Contents/SharedSupport/skimnotes get -format rtf "{}" ";"
Christiaan
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot_______________________________________________
Skim-app-users mailing list
https://lists.sourceforge.net/lists/listinfo/skim-app-users
Christiaan Hofman
2017-03-19 21:43:57 UTC
Permalink
Post by Misha Velthuis
Thanks a lot for the quick response! Both solutions work great.
Why are you saying that your script is safer? Is it because if provides more output, and thus more info when something goes wrong?
Thanks again for sharing all of this. It's making my day!
Misha
Because it does some more sanity checks, and also has some extra options.

Christiaan
Post by Misha Velthuis
Post by Christiaan Hofman
Post by Christiaan Hofman
Post by Misha Velthuis
Hi all,
Not sure if this is the right way to ask this, but I have a question about the skimnotes tool (http://sourceforge.net/p/skim-app/wiki/SkimNotes_Tool/ <http://sourceforge.net/p/skim-app/wiki/SkimNotes_Tool/>).
I have a relatively large database of .skim notes that I would like to convert into .txt or .rtf documents (so that DocFetcher <http://docfetcher.sourceforge.net/en/index.html> can find them).
Today I found out about the skimnotes tool and it works great, the only problem is that it only seems to work on single files.
When there is only one .pdf file in the active directory (Mac terminal), and I run the command: "./skimnotes get -format rtf example.pdf", or when I run "./skimnotes get -format rtf *.pdf" I get an .rtf file with the notes of that pdf in the same directory. This works perfectly fine.
But when I have two pdf's or more in that directory, and I run the command "./skimnotes get -format rtf *.pdf" or "./skimnotes get -format rtf $(find *.pdf)" I do not get any .rtf file, and instead, one of the pdf's is greatly reduced in size and has become un-openable.
Am I doing something wrong? Is this a bug in the tool?
Is there any easy way to convert a large number of .skim notes into .rtf or .txt files? Am I on the right track?
Thanks a lot in advance! And thanks for working on this great software!
Best,
Misha
The skimnotes tool works on single files only. A second file is interpreted as the output file (run skimnotes help), so it won’t be a PDF file (even if you give it a PDF extension).
So you should run the skimnotes tool in a loop instead, for instance by using it in the command passed in a find command. There are two scripts running skimnotes on a list of files on the Wiki. Though they run slightly different commands from what you want, you could easily adapt them. The skimbulk script should come closest to what you want (it gets notes in .skim format rather than .txt or .rtf).
Christiaan
BTW, here is a quick and dirty way to do it (skimbulk essentially does something like this, but neater and safer)
find DIR -type f -name "*.pdf" -exec /Applications/Skim.app/Contents/SharedSupport/skimnotes get -format rtf "{}" ";"
Christiaan
Misha Velthuis
2017-03-19 22:42:44 UTC
Permalink
I see. I tweaked your script. It's working perfectly. Thanks again.

Misha
Post by Christiaan Hofman
Post by Misha Velthuis
Thanks a lot for the quick response! Both solutions work great.
Why are you saying that your script is safer? Is it because if provides more output, and thus more info when something goes wrong?
Thanks again for sharing all of this. It's making my day!
Misha
Because it does some more sanity checks, and also has some extra options.
Christiaan
Post by Misha Velthuis
Post by Christiaan Hofman
Post by Misha Velthuis
Hi all,
Not sure if this is the right way to ask this, but I have a question about the skimnotes tool (http://sourceforge.net/p/skim-app/wiki/SkimNotes_Tool/).
I have a relatively large database of .skim notes that I would like to convert into .txt or .rtf documents (so that DocFetcher can find them).
Today I found out about the skimnotes tool and it works great, the only problem is that it only seems to work on single files.
When there is only one .pdf file in the active directory (Mac terminal), and I run the command: "./skimnotes get -format rtf example.pdf", or when I run "./skimnotes get -format rtf *.pdf" I get an .rtf file with the notes of that pdf in the same directory. This works perfectly fine.
But when I have two pdf's or more in that directory, and I run the command "./skimnotes get -format rtf *.pdf" or "./skimnotes get -format rtf $(find *.pdf)" I do not get any .rtf file, and instead, one of the pdf's is greatly reduced in size and has become un-openable.
Am I doing something wrong? Is this a bug in the tool?
Is there any easy way to convert a large number of .skim notes into .rtf or .txt files? Am I on the right track?
Thanks a lot in advance! And thanks for working on this great software!
Best,
Misha
The skimnotes tool works on single files only. A second file is interpreted as the output file (run skimnotes help), so it won’t be a PDF file (even if you give it a PDF extension).
So you should run the skimnotes tool in a loop instead, for instance by using it in the command passed in a find command. There are two scripts running skimnotes on a list of files on the Wiki. Though they run slightly different commands from what you want, you could easily adapt them. The skimbulk script should come closest to what you want (it gets notes in .skim format rather than .txt or .rtf).
Christiaan
BTW, here is a quick and dirty way to do it (skimbulk essentially does something like this, but neater and safer)
find DIR -type f -name "*.pdf" -exec /Applications/Skim.app/Contents/SharedSupport/skimnotes get -format rtf "{}" ";"
Christiaan
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot_______________________________________________
Skim-app-users mailing list
https://lists.sourceforge.net/lists/listinfo/skim-app-users
Loading...