This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM rust:1.73 as builder | |
WORKDIR /usr/src/downloads | |
WORKDIR /usr/src/protoc | |
ENV PROTOC_DIR /usr/src/protoc | |
ENV PB_REL="https://github.com/protocolbuffers/protobuf/releases" | |
ENV PB_VER="24.4" | |
ENV PB_ARCH="x86_64" | |
RUN curl -LO --output-dir /usr/src/downloads "$PB_REL/download/v${PB_VER}/protoc-${PB_VER}-linux-${PB_ARCH}.zip" && \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
def transferTo(mw, cid1, cid2, tags=""): | |
new = mw.col.get_card(cid2) | |
old = mw.col.get_card(cid1) | |
new_note = mw.col.get_note(new.nid) | |
old_note = mw.col.get_note(old.nid) | |
mw.col.db.execute("update cards set due = ? where id = ?", old.due, cid2) | |
mw.col.db.execute("update cards set factor = ? where id = ?", old.factor, cid2) |