Batch download bibtex data? - bibtex

Is there a way to batch download the bibtex data from Google Scholar or somewhere esle?
I tried a few GS Scrapers, e.g.,
https://github.com/gimoya/theBioBucket-Archives/blob/master/R/Functions/GScholarScraper_3.1.R
But none of them can download the bibtex files. A mysterious scisig key is need to fetch the file.
I also tried Jabref. It can get the bibtex files in bulk.
But the advanced search features in GS are all disabled.
Thanks for any pointers.

I updated scholar.py with this functionality. See http://www.github.com/hildensia/scholar
$ ./scholar.py "Alan Turing Entscheidungsproblem" --bibtex --count 1
#article{turing1936computable,
title={On computable numbers, with an application to the Entscheidungsproblem},
author={Turing, Alan M},
journal={Proceedings of the London mathematical society},
volume={42},
number={2},
pages={230--265},
year={1936},
publisher={London, UK}
}
$

You can use Mendely for batch download of bibtex provided that you maintain a repository of papers using this software

Related

Batch convert dae to scn

Is there a way to batch convert Collada dae files to Scenekit scn files?
My project uses approx 50 models created in sketchup that are updated regularly, these are exported to DAE but also need to be converted to SCN files for usage in xCode. I know it can be done manually via xCode and "Convert to SceneKit scene file format (scn)" but this take to much manual labour.
Based on https://the-nerd.be/2014/11/07/dynamically-load-collada-files-in-scenekit-at-runtime/ I figured out that the scntool is able to convert it via the command line and write the following script:
find ./dae -name "*.dae" | while read f ; do
inputfilename=$(basename $f)
echo $inputfilename
./scntool --convert $f --format scn --output ./scn/$inputfilename
done
for file in ./scn/*.dae; do
mv "$file" "./scn/$(basename "$file" .dae).scn"
done
#HixField has a good shell script for invoking scntool. Another way to do that is to leverage Xcode's build system, which does the same thing for any .dae files you put in a project's scnassets folder. Even if you're not bundling those files in your app, you can create a dummy Xcode target or project that contains all the assets you want to convert, and it'll convert them all whenever you build the target. (Which you could then integrate into a CI system or other automation.)
I agree with #Hixfield About everything except you need to add one more option to the scntool to get your materials correctly without need to re add all manually
scntool --convert INPUT.dae --format scn --output OUT.scn --asset-catalog-path .
The dot at the end of the command line is very important it means you will set resources to same location
If you don’t set the —asset-catalog-path . You will have no materials

Analyze EPS metadata - Distinguish between Freehand EPS and Illustrator EPS

I want to analyze a few thousand EPS files and sort them according to their application in which they have been created (in my case Freehand or Illustrator).
I know that the the information is stored in the file header (%%Creator), but how can I analyze it thoughout all files?
I am looking for a tool to analyze the files and to give me a txt or csv file...
I already tried the following:
Windows Explorer --> shows lots of properties, but not the %%Creator
Adobe Bridge --> shows file metadata, but only of single files
Adobe Bridge, MetaData Script (See the Bridge section -- Extract Metadata) --> the script should export all metadata, but doesn't do it's job for all files...
pdfinfo.exe --> part of Xpdf, I assumed, if it can analyze PDF files, it may also analyze EPS, but does't...
Ghostscript --> I searched Google, but did not find a solution
ImageMagick --> I searched Google, but did not find a solution
ExifTool --> although it seems to be powerful, I could not manage to get the information intended
I am happy for any help!
Best regards
Hape
Write a simple script here a python 2.x script for example:
import glob
for fname in glob.glob('*.eps'):
with open(fname) as fp:
line = fp.readline()
if not '%!PS' in line:
continue
print "-- %s --" % fname
line = fp.readline().strip()
while line.startswith("%"):
if line.startswith("%%"):
print line
line = fp.readline().strip()
Edity: Updated script to understand windows style EPS previews. And relaxed the metadata requirements to match spec better

Is there a quick file open/find like IntelliJ's find file, or Sublime's? Something with fuzzy search. But in Emacs?

I'm looking for something that's a bit robust in how it finds files in Emacs. I have a project made up a number of different files, and a lot of them. So, I think maybe Emacs would need to cache a lookup or something like that to make a quick find/open facility to work. It would need to also be configured per project to consider only some directories and exclude others inside of this project, since a number of files and directories are generated and hold a massive amount of text and sometimes a concatenated representation of the rest of the code.
Is there a quick file open/find like IntelliJ's find file, or Sublime's? Something with fuzzy search. But in Emacs? That could help with this problem?
Projectile can probably do what you're after. It describes itself as a "project interaction library" with facilities for finding project files quickly.
Try projectile: https://github.com/bbatsov/projectile (see its fancy UI, helm-projectile). You'll have the command projectile-find-file. It is based on projects (they are defined by a .git/.gh/… or a .projectile).
permanent caching ? Yes
filter out directories ? Yes (with a command or a config into the .projectile)
fuzzy search ? Yes, a few: emacs'default, ido, ido-fuzzy, grizzl or helm.
you install it simply with M-x package-install RET projectile RET.
See this EmacsWiki page, which is is a jumping-off place for multiple answers to your question.
Emacs has a built-in file-name cache -- see (emacs) File Name Cache and this page.
See also Emacs bookmarks, and in particular, Bookmark+. You can bookmark any file or set of files. You can bookmark a Dired buffer, including its omit set, markings, and included subdirs. You can bookmark a set of such Dired buffers. You can aggregate bookmarks and use them to perform actions that set up environments etc. They can be triggered in various ways. You can bookmark Emacs desktops. You can tag bookmarks and files & dirs with free-form tags, which lets you organize them flexibly into overlapping sets.
See also this page about project support with Icicles.

How can I load a Maya .MA file from MEL when it has an unresolved reference?

I am trying to use a MEL script to load ANIMATION.MA file that references CHARACTER_RIG.MA. The CHARACTER_RIG.MA and ANIMATION.MA files are produced by someone else and supplied to me. The ANIMATION.MA is looking for N:/Project/Maya//char/character/CHARACTER_RIG.MA
If I open ANIMATION.MA from Maya, or use the equivalent MEL command I always get prompted with:
"Reference File Not Found"
Reference File Not Found: N:/Project/Maya//char/character/CHARACTER_RIG.MA.
[Abort File Read] [Skip] [Browse...] [Retry]
If I tap browse, and select the CHARACTER_RIG.MA then it opens perfectly. I can see it created a reference in the Reference Editor that has the Unresolved Path (N:/...) , the Resolved Path (/my/path) and the namespace and the namespaceRN.
My question is, how do I do the equivalent of the "Browse..." from MEL? I tried pre-creating a reference, but it doesn't let me set the unresolved path, so when I load the ANIMATION.MA it keeps prompting in MAYA.
file -f -options "v=0" -typ "mayaAscii" -o "/Source/project/assets/anims/ANIMATION.MA"
If you know the directory where the file is, then you can use the dirmap command. The command dirmap allows you to remap directory structures if your disk configuration changes. So in this case it would look like:
dirmap -en true;
dirmap -m "N:/Project/Maya//char/character" "/my/path";
Possibly more manageable if you have lots of mappings to do especially when moving form a windows machine to a *nix one. However it is much more useful to define your project structure because then things just work when you move, tough this may not be the best of choice for shared assets.
I ended up finding several solutions:
Rename the RIG.MA file to match the filename in ANIM.MA (they were different in my case) and put it in one of the search or project folders that MAYA uses and it will automatically find it.
or
Programatically through code (or manually) edit the ANIM.MA file to remap the file/folder of the RIG.MA to where you want to load it from. Note: You
also need to remap any other files, such as textures. I did this with
perl -pi -e 's/\Qold-path\E/\Qnew-path\E/g' ANIMATION.MA
HTH someone else.
Quick and easy, File, Project, Set and select the folder where meshes or whatever it is.

How to move all mp3 files into a single directory?

I have a bunch of MP3 files split up into artist\album, and I want to move these all into a single directory, and get rid of the directory itself, using a windows batch file (hence the tags)
You can start from:
for /R %%x in (*.mp3) do move "%%x" "c:\dir"
Use the Windows search function to search for *.MP3, wait for it to finish. Select all results and use cut. Paste into the target directory.
Then the subdirectories should be empty. You can select them all at once and delete them.
For a bit of an overkill of an effort, install any Unix utilities (e.g. CYGWIN, many oithers) and do "mv //* final_dir" :)
Of course, you will be left with a highly useful and uber cool set of unix utilities for Windows.
Another overkill is t install ActivePErl and do it in Perl:
map { move($_, $final_dir) || die "Can not move $_: $!" } glob("basedir/*/*/*");
fs-dependent, filenumberlimit experimental result was you can have thousands of files same level here, didn't try > 10000, > 1000 ok
EDIT I see you want to do wit with "win batch" (in one of your comments added later)... I leave my answer up as an alternative...
I've used JP soft's 4NT (a command.com replacement) to do this.
cd <root of mp3 tree>
global /i move *.mpr \newdir
just beware that newdir aboslutely must not be a child of <root of mp3 tree>
global executes a command (the move command) in every subdirecotry of the starting directory. /i tells it to ignore returncodes (a directory might contain zero mp3 files).
4NT is nolonger sold but "Take Command" should work also.
artist>move *.mp3 destinationDirectory will work I believe.
This should be moved to superuser, first off. Second, I use MusicBrainz for my mp3 library.
Since the question has gotten more complex, let me elaborate on MusicBrainz.
You point it at a music folder, deep as you want, and it grabs all songs found in that directory. It then offers to retag them based on it's user-generated DB. It uses some crazy method of audio finger printing to guess any songs that either lack meta-data or need the right meta-data (say goodbye to Aretha Franklin doing "Son of Preacher Man" and the famous Rolling Stones cover of "Brown Eyed Girl").
After finishing up with any meta data correction, you hit save, and it will:
a) replace/add the meta data tags
b) move your mp3 files into directories based on any pattern you specify
c) if you set this, it will delete any folders that it leaves empty upon file relocation
So, you could simply tell it NOT to retag and NOT to use any meta data for folder destination, and it will all that you want (and more if you want it to).
I have mine set to grab stuff from my "Giant Music Mess" folder and then put them into folders based on artist, album, disc, and finally give the mp3 file a "track# - title" rename. Something like Music Library/%Artist%/%Album%/%Vol%/%#% - %title

Resources