Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Chunjee
Oct 27, 2004



French Canadian posted:

Humble Request
Problem: I need to append two or three characters to the end of a PDF before sending to a vendor. But after doing this manually in explorer for many dozens of times it gets old. Example original PDF name is "part.pdf"

Request Fill
Name: SA-rightclickrename
Download link: https://github.com/Chunjee/SA-rightclickrename/releases
Source Code: https://github.com/Chunjee/SA-rightclickrename
Features and Usage:
Basically you can define as many appendments as needed in settings.json, and those become options in the right click menu. This won't work at all in an underscore setup but I can fix that with more details. It depends on all file appendments being -[x] and will insert or replace any existing one before the file's extension. [basefilename]-[ammendment].[extension]
Screenshot:



Caveats:
Would probably have issues if you have more than one "-" in the filename
In effort to keep my self-imposed 2 hour time limit, there was very little done to hide the GUI or turn it into a tray icon. When closed it will remove all right-click context menu options it added. I figured this was better than potentially stranding the user with no way to remove them.

Chunjee fucked around with this message at 10:41 on Oct 17, 2018

Adbot
ADBOT LOVES YOU

Chunjee
Oct 27, 2004



I replaced the UI with a tray icon:



Right click context menu will be added while that is running and removed entirely when quit.

Didn't do anything to address possible use of underscores.

KOTEX GOD OF BLOOD
Jul 7, 2012



Chunjee posted:

This concerned me so I re-wrote the scoring mechanism. I'm uploading a new release shortly which uses a different algorithm for measuring the string similarity.


I also added an error message for those cases to provide some insight:

Thanks for this. Weirdly, the new version can't handle apostrophes, colons, or other special characters; additionally, I get this error message even when I do set the threshold to a negative number.

e: commas don’t work either :(

KOTEX GOD OF BLOOD fucked around with this message at 20:22 on Oct 26, 2018

Chunjee
Oct 27, 2004



KOTEX GOD OF BLOOD posted:

Thanks for this. Weirdly, the new version can't handle apostrophes, colons, or other special characters; additionally, I get this error message even when I do set the threshold to a negative number.

e: commas don’t work either :(

I had a few ideas of what the problem might be but today I sat down and figured out what it was for sure.

When searching for "Amélie (2001)" or "Am'elie (2001)" I get the following in the logs:
JavaScript code:
{"msg":"Am being searched with the year: 2001"}
So it's getting cut at special characters when being pulled from Excel or the temp array I have. I'll figure out which one and upload a new version tomorrow.

Chunjee
Oct 27, 2004



Ok v1.0.6 solves the issue with special characters in the movie title. I also compiled specifically in UNICODE to ensure the best special character handling.

KOTEX GOD OF BLOOD
Jul 7, 2012



Thank you so much! Can't wait to give it a shot!

Do you mind if I share the link to this tool widely? I think a lot of people will be eager to use it.

Chunjee
Oct 27, 2004



Please do share. 100+ downloads would be cool. Excel doesn't seem like a format PLEX would use; what does this hook up with?

post hole digger
Mar 21, 2011


Moving this to a different thread cause I don't think this is the right place for it.

post hole digger fucked around with this message at 00:34 on Nov 2, 2018

Anarchist Mae
Nov 5, 2009

by Reene


Lipstick Apathy

I'm currently in the middle of making a desktop app for the forums, should run on Linux and maybe even Windows. Is there a good place to post things that help me test app features? For example I want to add support for embedding Mastodon statuses like you can with Twitter statuses but I don't have anywhere to do that that isn't janking up someone elses thread.

So I decided to jank up this thread instead!

https://fosstodon.org/@measlytwerp/100568808235949213

Anyhow, I'm approaching a 0.1 release, and I guess I could share that here?

nielsm
Jun 1, 2009




project.log should be the forum for that kind of projects where you can blog and test as much as you want. I think.

Anarchist Mae
Nov 5, 2009

by Reene


Lipstick Apathy

Oh thanks! Until now I didn't even know sub forums could have sub forums...

KOTEX GOD OF BLOOD
Jul 7, 2012



Chunjee posted:

Please do share. 100+ downloads would be cool. Excel doesn't seem like a format PLEX would use; what does this hook up with?
Will do!

Many of us who use a solution other than Plex, or *gasp* physical media, keep a list of movies in this format, so the tool allows us to make a "book" of what we've got which includes the metadata. In my case, it's for my parents, who are older and not the type to look things up on IMDb. This way they can still have access to that data. I'm the Good Son

FlyingCheese
Jan 17, 2007
OH THANK GOD!

I never thought I'd be happy to see yet another lubed up man-ass.


Humble Request
Problem: I have an extremely large music library, and manage a couple music libraries for local community (read: poor as poo poo) radio stations. These files are tagged pretty well but there is one feature that I and others have been craving. Bandcamp artist/album pages have a very handy piece of info that isn't normally in other databases (discogs, musicbrainz, etc.) and that is the bands home town. Bandcamp also does not put this tag in their files when you buy music from them.
Description and requirements: I'd love a tool that can read Artist data from music files, scrape Bandcamps site for this piece of data, and put it in either an ID3 or Vorbis tag (depending on file format).
The text needed is contained in
code:
<span class="location secondaryText">City, Country</span>
Nice to have features: If this could be a foobar2000 plugin that would be incredible, but whatever is easiest for you.

FlyingCheese fucked around with this message at 11:11 on Nov 4, 2018

Chunjee
Oct 27, 2004



Are the bandcamp urls documented anywhere in the file metadata or elsewhere? I have programmatically updated ID3 tags before so this would be cake if I can get a dependable source for the data.

Trouble is:
- The Bandcamp API doesn't say what it provides and access is also not freely available unless they decide they like you.
- learning how to search each file with bandcamp-scraper would take me several hours and you would end up with a NodeJS app instead of an easy to use .exe


But if you already know the bandcamp urls for each album this should be easy because I can just ping that page and get the data.

nielsm
Jun 1, 2009




Writing it as a foobar2000 plugin would simplify the entire reading and writing music file metadata, letting you focus on just the look-up part. It sounds like the best approach to take.

FlyingCheese
Jan 17, 2007
OH THANK GOD!

I never thought I'd be happy to see yet another lubed up man-ass.


Chunjee posted:

Are the bandcamp urls documented anywhere in the file metadata or elsewhere? I have programmatically updated ID3 tags before so this would be cake if I can get a dependable source for the data.

Trouble is:
- The Bandcamp API doesn't say what it provides and access is also not freely available unless they decide they like you.
- learning how to search each file with bandcamp-scraper would take me several hours and you would end up with a NodeJS app instead of an easy to use .exe


But if you already know the bandcamp urls for each album this should be easy because I can just ping that page and get the data.

Some files have the url in the comment tag "Visit _____" but others do not. I was hoping the app would just do an Artist search, or better yet, look for the url in the comment tag first and then fall back on searching.


nielsm posted:

Writing it as a foobar2000 plugin would simplify the entire reading and writing music file metadata, letting you focus on just the look-up part. It sounds like the best approach to take.

That does sound like good news!

Feral Integral
Jun 6, 2006

YOSPOS



FlyingCheese posted:

Some files have the url in the comment tag "Visit _____" but others do not. I was hoping the app would just do an Artist search, or better yet, look for the url in the comment tag first and then fall back on searching.


That does sound like good news!

Doesn't look too hard to scrape, do you mind posting some example artists that have the comment url thing in the tags? Also if any of them have songs that are free to download that would be cool so I could test with them

Also there are sometimes discrepancies in the bands 'name' vs their url on bandcamp: https://kunayalaproductions.bandcamp.com/ . This company's url is kunayalaproductions, but seems to refer to itself on all it's pages/logos as Kunayala Records. So I guess some of the bands locations might not be retrievable this way, or a wrong location could conceivably be set

One more thing: according to http://id3.org/id3v2.3.0#Declared_ID3v2_frames which is like all the standard tags you can use according to the id3 specifications, I should use the "User defined text information" tag to store this info, if thats good with u

Feral Integral fucked around with this message at 18:16 on Nov 17, 2018

revmoo
May 25, 2006

#basta


Can I get an osx app that makes the cursor continue getting bigger the longer you shake it with no limit to size?

FlyingCheese
Jan 17, 2007
OH THANK GOD!

I never thought I'd be happy to see yet another lubed up man-ass.


Feral Integral posted:

Doesn't look too hard to scrape, do you mind posting some example artists that have the comment url thing in the tags? Also if any of them have songs that are free to download that would be cool so I could test with them

Also there are sometimes discrepancies in the bands 'name' vs their url on bandcamp: https://kunayalaproductions.bandcamp.com/ . This company's url is kunayalaproductions, but seems to refer to itself on all it's pages/logos as Kunayala Records. So I guess some of the bands locations might not be retrievable this way, or a wrong location could conceivably be set

One more thing: according to http://id3.org/id3v2.3.0#Declared_ID3v2_frames which is like all the standard tags you can use according to the id3 specifications, I should use the "User defined text information" tag to store this info, if thats good with u

Yeah sure, here's a few free examples.
https://barochandel.bandcamp.com/album/baro-bokhalo
https://thisisnotwarszawa.bandcamp.com/album/i-p-s
https://greynbownes.bandcamp.com/releases

Would using the search function fix that issue?

And as far as tags, it doesn't matter much what tag it uses, as I can remap them in Foobar2000 if necessary. I would imagine User Defined would be a good one to use. I will say that most of this music is stored as FLAC so it needs to work with vorbis tags too.

Thanks for looking into this.

lowcrabdiet
Jun 28, 2004
I'm not Steve Nash.

College Slice

Nvm found a guy on freelancer.com

lowcrabdiet fucked around with this message at 16:05 on Dec 2, 2018

TheCog
Jul 30, 2012

I AM ZEPA AND I CLAIM THESE LANDS BY RIGHT OF CONQUEST


EDIT: missed a line, nvm

Chunjee
Oct 27, 2004



This kindof thread just doesn't seem to live well on SA these days. Looking for a new home that can be referenced in the OP or a megathread.

pseudorandom
Jun 16, 2010





Yam Slacker

Chunjee posted:

This kindof thread just doesn't seem to live well on SA these days. Looking for a new home that can be referenced in the OP or a megathread.


Are you saying you need some kind of tiny app that can let people request tiny apps?

mobby_6kl
Aug 9, 2009



No, I think what this means is that we solved all of eveyone's little problem, so there's nothing left to do now.

FlyingCheese
Jan 17, 2007
OH THANK GOD!

I never thought I'd be happy to see yet another lubed up man-ass.


mobby_6kl posted:

No, I think what this means is that we solved all of eveyone's little problem, so there's nothing left to do now.

My request is still open, if you're looking for a project.

tactlessbastard
Feb 4, 2001

Godspeed, post


Fun Shoe

mobby_6kl posted:

No, I think what this means is that we solved all of eveyone's little problem, so there's nothing left to do now.

OK, how's this:

I've got a folder on my win10 desktop that is the output dump of a process that as of today has 163 files (and growing, at an alarmingly increasing rate) , all named Mass Balance X.xls, where X corresponds to a work order # for a work order in NetSuite. Somebody has to open the respective work order in NetSuite, attach the corresponding .xls to the work order, and then move the .xls to a subfolder "Already Uploaded" in the original folder. This process needs to repeat until the folder is empty. If anyone can save me from this drudgery I'll ship them a case of our product (we bottle unicorn farts)*





*it isn't unicorn farts

Chunjee
Oct 27, 2004



I can move files like a champ and even open xls files. But I'll have to google NewSuite. Dunno what that is.

Volguus
Mar 3, 2009


tactlessbastard posted:

OK, how's this:

I've got a folder on my win10 desktop that is the output dump of a process that as of today has 163 files (and growing, at an alarmingly increasing rate) , all named Mass Balance X.xls, where X corresponds to a work order # for a work order in NetSuite. Somebody has to open the respective work order in NetSuite, attach the corresponding .xls to the work order, and then move the .xls to a subfolder "Already Uploaded" in the original folder. This process needs to repeat until the folder is empty. If anyone can save me from this drudgery I'll ship them a case of our product (we bottle unicorn farts)*





*it isn't unicorn farts

The problem is that NetSuite is an enterprise app so people will not normally have access to it at home (unless they have a "for home" version which i doubt). And access to that app is mandatory to develop and test such a little script. My recommendation is to fiddle around with AutoIt. Is a really simple scripting language much like Basic that allows you to move the mouse, click, simulate keyboard pressed, etc. Spending a bit of time with it, even if you're not a programmer, may make you an enough of an expert to be able to solve your little problem. And really, your little problem needs solving 'cause that's mind numbingly boring tedious lovely job.

Or maybe you're lucky and someone here has access to NetSuite at work and doesn't mind to do the work for some unicorn farts.

mobby_6kl
Aug 9, 2009



Yeah this doesn't sound too difficult but we don't run NetSuite so I can't develop or test it. I actually had to glue together two pieces of our own enterprisy stuff that didn't talk to each other using another tool whose name escapes me now, but it was python based and you could have it find buttons to click based on image recognition (which was very helpful when there weren't any keyboard shortcuts and the buttons weren't normal Win32 buttons with handles). Give it a shot, or in the worst case post some screenshots of each step you need to do in NetSuite here.


FlyingCheese posted:

My request is still open, if you're looking for a project.
poo poo, forgot about this thread for a while. Yeah I'll give it a go, I've scraped a ton of stuff with Perl even when the sites didn't really want me to :v:

tactlessbastard
Feb 4, 2001

Godspeed, post


Fun Shoe

I'll look into AutoIt but I think there may be a slight snag. I'll demonstrate here:

https://imgur.com/nvDELBO

Here's my little nemesis, folder full of stuff that needs uploaded.

https://imgur.com/Ix295mq

Home screen for NetSuite

https://imgur.com/8BQa8Z

You access work orders by either searching through the list for the one you want (it's never going to be on the first page of results) OR typing the work order # into the search bar and clicking the corresponding work order. There will always be more than one result.

https://imgur.com/cnXMey7

Here's a work order, there's a add button there you hover over

https://imgur.com/KG17ck0

and then you can open up the file upload dialogue

https://imgur.com/a3I2LZg

walla

tactlessbastard fucked around with this message at 17:37 on Mar 11, 2019

Chunjee
Oct 27, 2004



After thinking about it, I think it's possible; but would be pretty janky. If searching "8206" gets more than one result; that part may still need a human to click the right order, but a pause can smooth that over. The other big challenge I see is the "Choose File" dialogue. In my experience you can usually drag-drop a file directly onto those. Which makes me wonder, do you have a second monitor that could be utilized for leaving an explorer window navigated to the desktop with?

Being basically a website, it would be a whole lot easier if the was an API to manage these orders with.


Possibly related: https://cloud-elements.com/elements/netsuite/

mobby_6kl
Aug 9, 2009



If it's a normal Windows Open File dialog, you can also just paste a full path to the file into the Name field. But getting more than one result in the search sucks. Is there really no way to filter it down to only the correct document? Everything else is quite doable otherwise.

tactlessbastard
Feb 4, 2001

Godspeed, post


Fun Shoe

mobby_6kl posted:

If it's a normal Windows Open File dialog, you can also just paste a full path to the file into the Name field. But getting more than one result in the search sucks. Is there really no way to filter it down to only the correct document? Everything else is quite doable otherwise.

No, If there's another way to pull up work orders in NetSuite, I don't know it. You can't even predict what the address of a given work order is going to be because they all get unique accounting IDs as they are created, same as every other object created in NetSuite from sales orders to item fulfillment. I'm going to go talk to the accounting VP that administrates NetSuite and see if he has any ideas.

Scaramouche
Mar 26, 2001

SPACE FACE! SPACE FACE!



Yeah I used to do Netsuite dev it's kind of crappy and insular. I don't know if what you want is possible without breaking their security model entirely. You could probably hack the file dialog button but you would lose the ability to relate the uploaded file to the specific order if I'm parsing what you want to do right. The alternatives as I see them would be to dev out a specific SuiteTalk app that has a better workflow than the existing ones in your screenshot, or maybe see if you can do it up with an API call (have no idea if the Work Order files are API accessible)

tactlessbastard
Feb 4, 2001

Godspeed, post


Fun Shoe

Scaramouche posted:

Yeah I used to do Netsuite dev it's kind of crappy and insular. I don't know if what you want is possible without breaking their security model entirely. You could probably hack the file dialog button but you would lose the ability to relate the uploaded file to the specific order if I'm parsing what you want to do right. The alternatives as I see them would be to dev out a specific SuiteTalk app that has a better workflow than the existing ones in your screenshot, or maybe see if you can do it up with an API call (have no idea if the Work Order files are API accessible)

Yeah, the VP that administrates NetSuite reacted with growing horror as I described what I was trying to do so I'm probably going to let this one lie. I appreciate y'all's input and if you want any canned unicorn farts, send me a PM.

Chunjee
Oct 27, 2004



Reacting in horror to end-users trying to overcome software friction is something I'll just never understand.

"My God... The secretary is trying to make improvements instead of choosing 20 dropdowns like I want them to!"

Chunjee
Oct 27, 2004



Constructive idea: measure (in dollars) how much could be saved by adding a better batch process for the entire folder.

1 hour * times performed a month * compensation rate = [x] saved a month
That's how I've been told to do it when I don't have the permissions to automate something.


Personally "it sucks the way it works now" is reason enough for me but doesn't translate well to the rest of the business without specific $ signs attached.

Chunjee fucked around with this message at 23:26 on Mar 18, 2019

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell



edit: nevermind, i figured it out myself!!

Humble Request
Problem:
My C or C++ is 20 years out of date and I don't really feel like brushing up on them or learning how Windows works right now. I'd like something to do this:

nielsm posted:

Possibly a hook: SetWindowsHookEx with WH_CALLWNDPROCRET, look for WM_CREATE and WM_DESTROY messages.

Basically, I'm looking to automate some stuff in python when different windows are opened and enumerating all windows in a loop is either slow or CPU intenstive. AFAICT, no one has done any work on getting SetWindowsHookEx to work in python.

Or I guess this?

Bonfire Lit posted:

SetWindowsHookEx has some requirements that make it unwieldy (like having the hook code in a DLL so it can be injected). If you only want to track windows getting created/destroyed, you can use the accessibility functions (SetWinEventHook).



Description and requirements:
At a minimum it would just sit there printing to stdout a message when any window was created or destroyed. Probably would be ideal if it printed the handle and possibly the title...not sure if this info is part of the payload of this hook.

I could just run this via python and watch the messages.

Nice to have features:
  • publish the info on a zmq socket. Zmq is easy to use.
  • some nice comments so I can make changes myself and maybe convince me to actually brush up on C and Windows programming!

Thermopyle fucked around with this message at 21:49 on Apr 8, 2019

gary oldmans diary
Sep 26, 2005


Is there a way to make do a quick string replace in a binary file from the command line?

Doing it manually for 1 file I would open up my ancient hex editor, find the string "So.Many.Dang.Butts", and type over it with "Just 1 Butt             " (however many spaces needed to match string length). Probably stop after replacing one instance instead of going to the end of the file (option?). Then save in-place without rewriting the entirety of some big old 8GB file every time.

It seems like this tool should already exist somehow.

E: So many near-misses on finding this tool out in the wild.

gary oldmans diary fucked around with this message at 02:20 on Apr 7, 2019

Adbot
ADBOT LOVES YOU

Toshimo
Aug 23, 2012

Patron Fae
of
Broken Software


Humble Request

I was gonna put this in SA-Mart but someone pointed me here. I'd definitely kick some coin to whomever could do this, but I'd rather the money go to a goon before I try one of those 3rd-party sites.

I need a quick and dirty frontend for a thing I'm doing.

I want to randomly pick a file from a directory and launch it.

See the image below for the background.

I'd like it to randomly cycle filenames (sans extension) in the blank space with black font at ~200ms/name (whatever is slow enough that the names are briefly visible, but fast enough to convey motion) before selecting a random filename and displaying it in red for 2 seconds and then launching the file using the command from the config file. The filename display should either auto-size the font to the length of the displayed filename or have a fixed size that's appropriate for up to a 64 character filename. UTF-8 support is super appreciated but not mandatory.

In order of preference, I'd like the randomization to start when:
* The spin button in the background is clicked
* Anywhere in the background is clicked
* The app launches

Any one of those is fine, but they are ranked in order of preference.

I'll have a config file that is roughly:
font=Tahoma
workingdir=C:\Temp
command_line=notepad.exe $1 /exec /f

Where:
* font is the name of an installed font (so I can find one that looks to my liking). Idk how whatever language you use is gonna need to address fonts, but just document it and I'll make sure my config file works.
* workingdir is where all the files to pick from are. UNC support is preferred but not mandatory.
* command_line is the command that will be run against the chosen filename.

You can change up any of the formatting or however you need the config file to be formatted (idk if it's JSON or something, whatever works). It just needs to support flags.

Background image:

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply