PYCSW-ADMIN(1)
π PYCSW-ADMIN π
okay bestie, sit DOWN, because we're about to talk about pycsw-admin, the manual page for the pycsw admin utility π this is the glow-up era of your geospatial metadata workflow and honestly? it's giving main character.
β¨ NAME β¨
pycsw-admin β the pycsw admin utility π
no cap, that's literally it. it does the admin things. it's the utility. iconic behavior.
π¦ SYNOPSIS π¦
pycsw-admin -c command -f cfg [-h] [-p /path/to/records] [-r]
that's the whole vibe check right there, bestie. you bring a command, you bring a config file, and optionally some paths and the recursive flag π«Ά
πΈ OPTIONS πΈ
okay so here's the menu, and the way that every single one of these matters, i can't even.
-cβ the Command to be performed. your options are literally:setup_dbload_recordsexport_recordsrebuild_db_indexesoptimize_dbrefresh_harvested_recordsgen_sitemappost_xmlget_sysprofvalidate_xmldelete_records
pick one, queen. π
-fβ Filepath to pycsw configuration ποΈ your config file. the blueprint. the lore.-hβ Usage message π when you need the manual to explain the manual.-oβ path to output file πΎ where the goodies go.-pβ path to input/output directory or file to read/write metadata records π read from it, write to it, it's flexible like that.-rβ load records from directory recursively π it goes DEEP. it goes into every folder. it leaves no record behind.-sβ XML Schema π for when you need to validate against a schema.-tβ Timeout (in seconds) for HTTP requests (default is30) β±οΈ yes bestie, default is30, don't come for me.-uβ URL of CSW π the endpoint. the destination. the place we're POSTing to.-xβ XML document π your actual XML file.-yβ force confirmation β οΈ this one skips the "are you SURE" moment, so lowkey be careful with it, fr fr.
π EXAMPLE π
here's where it gets fun. twelve (12) whole situations. let's go.
1.) setup_db: Creates repository tables and indexes ποΈ
pycsw-admin -c setup_db -f default.cfg
2.) load_records: Loads metadata records from directory or file into repository π₯
pycsw-admin -c load_records -p /path/to/records -f default.cfg
Load records from directory recursively π
pycsw-admin -c load_records -p /path/to/records -f default.cfg -r
Load records from directory and force updates πͺ
pycsw-admin -c load_records -p /path/to/records -f default.cfg -y
Load metadata record from file into repository π
pycsw-admin -c load_records -p /path/to/file.xml -f default.cfg
3.) export_records: Dump metadata records from repository into directory π€
pycsw-admin -c export_records -p /path/to/records -f default.cfg
4.) rebuild_db_indexes: Rebuild repository database indexes π§±
pycsw-admin -c rebuild_db_indexes -f default.cfg
5.) optimize_db: Optimize repository database β¨
pycsw-admin -c optimize_db -f default.cfg
6.) refresh_harvested_records: Refresh repository records which have been harvested πΎ
pycsw-admin -c refresh_harvested_records -f default.cfg
7.) gen_sitemap: Generate XML Sitemap πΊοΈ
pycsw-admin -c gen_sitemap -f default.cfg -o /path/to/sitemap.xml
8.) post_xml: Execute a CSW request via HTTP POST π‘
pycsw-admin -c post_xml -u http://host/csw -x /path/to/request.xml
9.) get_sysprof: Get versions of dependencies π
pycsw-admin -c get_sysprof
10.) validate_xml: Validate an XML document against an XML Schema β
pycsw-admin -c validate_xml -x file.xml -s file.xsd
11.) delete_records: Deletes all records from repository π
pycsw-admin -c delete_records -f default.cfg
12.) delete_records: Deletes all records from repository without prompting ππ
pycsw-admin -c delete_records -f default.cfg -y
not me pointing out that number 12 with the -y skips the prompt entirely β it deletes ALL the records with zero confirmation, so please, PLEASE be careful bestie π
π MORE INFORMATION π
want more tea about pycsw? you can get it from /usr/share/doc/pycsw-doc after installing the pycsw-doc package π go read, it's worth it.
and that's the whole page, babes π this was pycsw-admin from the pycsw manual, dated February 2025, and yes the footer said PYCSW-ADMIN(1) again because it loves a callback β¨ slay, you're now officially admin-literate. periodt. ππ¦
π¦ where this page comes from
- debian trixie: pycsw 2.6.2+dfsg-2 Β· MIT
- ubuntu questing: pycsw 2.6.2+dfsg-2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms