Replies: 13 comments 14 replies
-
I'm in, too! |
Beta Was this translation helpful? Give feedback.
-
Sample of inconsistently arranged and named folders |
Beta Was this translation helpful? Give feedback.
-
Has anyone had any success or good leads of places to start to begin understanding how to help rename files and folders in bulk? Bulk Rename Utility may be the quickest way to address this but of course that is beside the point. I do want to say that if anyone in the group already has made progress related to the other highlighted topics in the google doc, or if they are maybe a better place for anyone to start, I say go ahead and dig into those. |
Beta Was this translation helpful? Give feedback.
-
Below is an example of what I'm want to achieve with a Python renaming/restructuring script. I'm going to have a go at it with the example with additional steps in the Python Study Groups 'How to'. Will let you all know how I go next week. Current state: Desired state: |
Beta Was this translation helpful? Give feedback.
-
Here is my ChatGPT-derived script for generating sequential directories with user input about the location, number of directories, and base name of the directories:
|
Beta Was this translation helpful? Give feedback.
-
Hello, I've been working since last time to build a script that will parse a complex directory of xml files for a specific tag and print the results to a csv. So far the csv gets created but is empty except for the column headers. Sorry if the code formatting doesn't appear correct. The remainder of this comment should be code: ` def find_key_value(root): def process_xml_file(xml_file, csv_writer): def main(directory):
Set the directory where XML files are locateddirectory_to_search = "path\to\my\directory" |
Beta Was this translation helpful? Give feedback.
-
Hi, I'm going to guess that the error is in your xpath statement: ".//mets:mets/mets:amdSec/mets:techMD/mets:mdWrap/mets:xmlData/dnx/section/record/key[@id='objectIdentifierValue']" Have you tried running just that and print all elem? You have specified a dnx namespace but it is not used in the xpath. |
Beta Was this translation helpful? Give feedback.
-
This one worked:
|
Beta Was this translation helpful? Give feedback.
-
Here is my python example to parse a directory of xml files for the mets:FLocat element where there is a URL. It gathers the path of the xml (so I know which one to look for depending on if the URL exists or not) the URL itself, and the Object ID from the Scholar's Archive repository. This prints to a CSV with the relevant information and leaves cells blank where there is no information. In this example, every xml has an Object ID always but not all have a mets:FLocat element.
|
Beta Was this translation helpful? Give feedback.
-
I wanted to post this here so Lars could make a comment that makes better sense than the notes I took last time!
|
Beta Was this translation helpful? Give feedback.
-
I'm curious who all is planning to attend today. I believe it is the last of this series having been 6 months. Last month was a little sparse but it has been full of conferences and things. |
Beta Was this translation helpful? Give feedback.
-
For the past 10 years I've been using the conventions set forth by Chris Beams in his blog post How to Write a Git Commit Message. That is, something like this:
Today in a Python4Lib meeting, I was introduced to Conventional Commits, which formalizes and extends those recommendations:
|
Beta Was this translation helpful? Give feedback.
-
Sorry, didn’t manage attend the last session this morning. Will any of you be attending iPres? If yes, we can meet and say hi. :-) Glad to know you all and hope to stay in touch. Warmest regardsJoyceOn 26 Jun 2024, at 7:37 AM, elihu ***@***.***> wrote:
For the past 10 years I've been using the conventions set forth by Chris Beams in his blog post How to Write a Git Commit Message. That is, something like this:
Add Norwegian language codes
Added codes for Bokmål and Nynorsk, also Norwegian macrolanguage.
Today in a Python4Lib meeting, I was introduced to Conventional Commits, which formalizes and extends those recommendations:
feat: add Norwegian language codes
Added codes for Bokmål and Nynorsk, also Norwegian macrolanguage.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Task 1: renaming files.
Beta Was this translation helpful? Give feedback.
All reactions