Inro + Script help to change multiple file names by URL

Hi everyone,

I’ve been using DEVONthink for some time now and absolutely love it. I’m not the one to ask for help and like to figure things out which is why this is my first post. Sorry in advance for the ridiculous length of the post, it was not intentional!

It looks like I need create two scripts to help streamline my workflow, so hopefully someone can help! I’d love to get some of your thoughts and feedback on my workflow as well to see if there’s anything else I can improve. I’ve picked up some great tips from others on the forum while learning how they use DEVONthink, so i figured I would do my best to contribute to the community with a detailed explanation of how I use DEVONthink. I hope it helps someone at least spark some new ideas if nothing else. So here it goes…

I’m currently using DEVONthink to help manage multiple SEO campaigns for a large website I own and operate. Here’s a breakdown of my setup:

DATABASES

  1. RSS
  2. Personal
  3. Daily

FAVORITES
Inbox
Bookmarks
Tags

SMART GROUPS
*Flagged
*All Labels

  1. Action

  2. In Progress

  3. Waiting

  4. Hold

  5. Done

  6. Other

  7. Today

  8. Yesterday

  9. Last Week
    Bookmarks
    CSV
    Duplicates
    Highlight
    Images
    Tags
    Web Archive

  10. I’m tracking about 50 or so RSS feeds from local sources to keep on top of important keywords This includes competitors i’m following, news sources and other industry related blogs, forums and communities related to my field. To help sort through this huge mess of data coming in daily from all of these different sources, i’ve set up a smart folder within my RSS database for about 15 of our main keywords to help track what’s going on on a daily basis. I’ve separated my RSS feeds mainly of how DEVON’s notification system for unread files. With so many coming in on a daily basis (200-800+ items) it would be nearly impossible to track new files clipped from chrome etc… During the day or whenever I get a chance i’ll quickly skim through items to flag or label for later.

  11. Pretty much self explanatory. Anything that doesn’t require immediate attention that I would still like to have quick access to.

  12. This is where I manage my daily workflow. I have folders stacked on top of more folders. Too many to list, but to give you an idea the top level folders are:

  13. Bookmarks

  14. Campaigns

  15. Linkbuilding

  16. Backlink Research

  17. Content

  18. Social Media

The folders are numbered based on importance to help keep them in place and help me find files easily. Also, I always keep my folders expanded which gives me a nice outline view. The outline view mixed with color coordinated labels is absolute heaven for me! I’ve found this setup to be great because it makes makes it very easy to see what i’m currently working on as well as other projects that are on the back burner.

I started using DEVON mainly because of it’s flexibility. I am a huge evernote fan (and also a paying subscriber) but I can confidently say that I would not feel comfortable managing my business using evernote. The ability to download, view and edit documents and websites with the ability to associate, group and tag in DEVON is priceless!

Now come my latest challenge. My goal is to effortlessly review and file/sort/tag 400+ competitor websites a day. I’ve figured out the first step which includes downloading a semi qualified list of linking sites to review. This is done through a separate application to helps filter the obvious low quality sites based on authority as wel as other factors. Now comes the tricky part of sorting and managing all of these sites. Here are a few of the key points that I can think of.

  1. Each downloaded batch consists of 1000+ sites

  2. Each download intentionally contains multiple pages from within the SAME domain. A competitor might have 15 links from one site over a long period of time. It could be comments, blog posts etc… This is important because if I decide to reject a specific domain because it’s a spammy directory, I could potentially have 50 other websites with the same domain that need to be deleted because they are all from the same domain. Every situation is different so I don’t want to automatically delete these other sites.

3.The best solution I could come up with to manage a large amount of sites is to rename each html/web archive and sort my list by domain name. I know I can sort by URL, but it’s problematic for a couple of reasons.

    1.  It includes http://www. which makes it hard to quickly skim and figure out what site I'm looking at.

    2. I still need to see the entire URL to use as a reference.
    
    3. Once you start shrinking the URL column with the entire URL, it pushes the entire URL together which erases the actual name of the URL.

The second issue is with importing a csv file with multiple columns. You can’t add custom columns to DEVO, so i’ve decided to use tags to fill the gap. Fortunately, the tags have worked out great, but I can’t figure out for the life of me how to import a csv file with tags pre attached. I’ve read a billion forums and scripts and feel that a workaround is possible somehow, but I’m still not sure how to accomplish this. I thought about two options that might work.

  1. converting my excel sheet in batch to multiple bookmarks with tags. I fell that this could be scriptable but can’t find the exact script I was looking for.

  2. converting a csv file to multiple evernote files, importing the evernote files and finally converting the evernote files in devon. I’m closer to a solution with this idea but still not there. I found a script to convert a csv (still figuring it out) but I;ve been having all sorts of trouble with converting an evernote file using devon. I was only able to find one recent topic that mentioned the evernote script was updated, but it hasn’t worked for me.

Finally, I thought of one last script that might help my work flow. I would need to apply an apple script to multiple files at once to rename each file. I tried to edit a couple of scripts to accomplish this but ended with a serious mess of code.

The script would copy apply the URL of the file, strip it down to the domain and replace the name of the file with the domain.

so it would take:

www.devonthink
http://devonthink
devonthink.com

and return the following as the name of the file

devonthink.com
devonthink.com
devonthink.com

Phew, that was long…

Feel free to chime in with any feedback or suggestions. Thanks!!

Are you downloading a list of site addresses or are you downloading web archives of the sites?

Assuming you are familiar with basic scripting, the DEVONthink scripting dictionary exposes a number of properties about web archives that can be useful. For example, you can access the source URL for each web archive and the archive’s tags and keywords (in cases where the site has metadata keywords). The URL could be parsed with a regex routine and/or AppleScript’s delimiter parsing to eliminate the URL cruft you don’t want to deal with. Then rename the files.

I didn’t quite understand the workflow description in the OP, but I suggest that parsing the properties that DEVONthink collects about the downloaded records is more efficient than brute shipping data back and forth to CSVs, Evernote, etc.

I’m starting with a csv file that contains specific metrics for each website. Here’s an example screenshot of both the csv file I’m importing as well as the what i’m trying to accomplish.

I am very familiar with the scripts, and use them almost daily but I was unable to find an existing scripts that could parse imported excel data. I know DEVON isn’t designed to import bookmarks and multiple tags through a csv file, but I would actually pay to have a script/program made. This would be extremely valuable to me.

Google “parse CSV” – there are many relevant xamples in AppleScript and other languages. If your CSV is stable (the columns are standard and do not change from instance to instance) then it’s a very trivial matter for an AppleScript to open the CSV, parse each line, based on the value in the “URL” column create a DEVONthink record of kind “bookmark”, then add tags to the bookmark record from the columns that contain tag values.

Perhaps no one here in the forum will volunteer to contribute a commercial script – but there are many for-hire ApplesScript developers. Have you tried Elance?