# Hanzi deck, sorting, and possibly editing decks via script

**URL:** <https://forums.ankiweb.net/t/hanzi-deck-sorting-and-possibly-editing-decks-via-script/12734>\
**Category:** Shared Decks\
**Created:** [August 28, 2021, 5:17pm UTC](https://forums.ankiweb.net/t/hanzi-deck-sorting-and-possibly-editing-decks-via-script/12734 "2021-08-28T17:17:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![milliliter](https://avatars.discourse-cdn.com/v4/letter/m/d6d6ee/32.png) [@milliliter](https://forums.ankiweb.net/u/milliliter)\
**Post date:** [August 28, 2021, 5:17pm UTC](https://forums.ankiweb.net/t/hanzi-deck-sorting-and-possibly-editing-decks-via-script/12734/1 "2021-08-28T17:17:10Z")

</div>

I got this deck [[Most Common 3000 Chinese Hanzi Characters - AnkiWeb](https://ankiweb.net/shared/info/39888802)], and it has everything I want, except tags. There’s a field for HSK level “for easy filtering,” but I don’t see any way in Anki to filter by anything but tags. (I want it to only show me cards where the “HSK” field is 1.) Is there a way to only study certain cards if there are no tags? Do I need an add-on?  
Assuming there is not, I figured I could write a script to add tags based on the contents of the “HSK” field that’s already on the cards. Is that possible? Because I opened the file in Notepad++ and it doesn’t contain any text.  
The deck’s creator provided a spreadsheet with all the data; would it be easiest to just create a new deck from that by using a script? Is there a guide to how to do that? Or a script that does that (or part of it) for me?
