Skip to content

Make it possible to copy lists into local environment with copydocs - #13361

Open
cdrini wants to merge 5 commits into
internetarchive:masterfrom
cdrini:debug/lists-i18n
Open

Make it possible to copy lists into local environment with copydocs#13361
cdrini wants to merge 5 commits into
internetarchive:masterfrom
cdrini:debug/lists-i18n

Conversation

@cdrini

@cdrini cdrini commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

While debugging #12966 , I needed to copy in some lists into the local dev environment, but kept hitting issues! This resolves those and lists can now easily and fully be copied in with copydocs.

To copy in a list recursively, you just do:

docker compose run web ./scripts/copydocs.py /people/ScarTissue/lists/OL341354L

And then it'll be available at http://localhost:8080/people/ScarTissue/lists/OL341354L/Book_Club_2026-08

Technical

  • Removed an old non-functional copydocs --lists flag
  • Create a stub account when importing a list, otherwise it won't render. Note does not copy over permissions, usergroups, etc.

Testing

Screenshot

Stakeholders

claude added 5 commits August 17, 2026 21:40
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Replace the saved set, which never actually caught cycles since
recursion happens before a key is marked, with seen, which is
independent of the destination writes and marked immediately when a
key is claimed.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
A real account can't be copied piecemeal (see the previous commit),
and copying a list's sub-key alone leaves its slugged page 500ing on
the missing owner. Register an empty stub account through infobase
whenever a /people/<username> key or one of its sub-resources is
copied.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The recursive call for referenced docs never passed editions along,
so it silently defaulted to False — works discovered via a reference
(e.g. from a list or author) never got their editions fetched, only
works passed directly as a key.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants